﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace GeocacheDownloader
{
    public class ImageFile
    {
        Helper.MapType _type;
        Marker? _marker;
        Helper.ImageFormat _format;
        Int16 _zoom;
        Point _size;
        bool _mobile, _sensor;

        public ImageFile(Helper.MapType type, Helper.ImageFormat format, Marker? marker, Int16 zoom, Point size, bool mobile, bool sensor)
        {
            _type = type; _marker = marker;
            _format = format; _zoom = zoom;
            _size = size; _mobile = mobile; _sensor = sensor;
        }

        #region public properties
        public bool Mobile
        {
            get { return _mobile; }
        }

        public bool Sensor
        {
            get { return _sensor; }
        }

        public Point Size
        {
            get { return _size; }
        }

        public Int16 Zoom
        {
            get { return _zoom; }
        }

        public Helper.ImageFormat Format
        {
            get { return _format; }
        }

        public Marker? Marker
        {
            get { return _marker; }
        }

        public Helper.MapType Type
        {
            get { return _type; }
        }
        #endregion

        public override string ToString()
        {
            string mob = _mobile ? "mobile" : string.Empty;
            string sensor = _sensor ? "sensor" : string.Empty;
            string marker = _marker.HasValue ? "marker:" + _marker.Value.Text + " - " + _marker.Value.Color.Name : string.Empty;
            return _zoom.ToString() + "    " + _type.ToString() + "    " + _format.ToString() + "    " + _size.X + "x" + _size.Y + "    "
                + mob + "    " + sensor + marker;
        }
    }
}
